/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package poetry.gui

import scala.swing._
import event.{Key, KeyPressed}
import GridBagPanel._
import java.awt.Font._

object About extends Dialog {
  resizable = false
  location = new Point(370,170)
  title = "პროგრამის შესახებ"
  defaultButton = new Button(Action("დახურვა") { About.close }) {
    font = new Font("sylfaen", PLAIN, 12)
    listenTo(keys)
    reactions += {
      case e: KeyPressed if e.key == Key.Enter => this.doClick
    }
  }
  contents = new GridBagPanel {
    border = Swing.EmptyBorder(10, 10, 10, 10)
    val c = new Constraints
    val fSize = 14
    c.fill = Fill.Horizontal
    c.insets.set(4, 5, 3, 5)
    c.ipady = 5
    c.grid = (0,0)
    layout(new MyLabel("ვერსია:",fSize) { horizontalAlignment = Alignment.Left }) = c
    c.grid = (0,1)
    layout(new MyLabel("ავტორი:",fSize) { horizontalAlignment = Alignment.Left }) = c
    c.grid = (0,2)
    layout(new MyLabel("დახასიათება:",fSize) { horizontalAlignment = Alignment.Left }) = c
    c.grid = (1,0)
    layout(new MyLabel("1.0",fSize) { horizontalAlignment = Alignment.Left }) = c
    c.grid = (1,1)
    layout(new MyLabel("ლია კურტანიძე",fSize) { horizontalAlignment = Alignment.Left }) = c
    c.grid = (1,2)
    c.gridwidth = 3
    layout(new MyLabel("ეს პროგრამა წარმოადგენს ავტორის სამაგისტრო ნაშრომს.",fSize) {
      horizontalAlignment = Alignment.Left }) = c
    c.grid = (0,3)
    c.gridwidth = 2
    layout(new MyLabel("<html>ყველა უფლება დაცულია &copy 2011.</html>",fSize)) = c
    c.grid = (3,3)
    c.ipady = 3
    c.insets.set(15, 5, 5, 5)
    c.fill = Fill.None
    c.gridwidth = 1
    c.anchor = Anchor.LastLineEnd
    layout(defaultButton.get) = c
  }
}
